package com.pn.mapper;

import com.github.pagehelper.Page;
import com.pn.entity.Brand;
import com.pn.entity.Supply;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BrandMapper {

    //显示品牌列表
    Page<Brand> brandPageList(Brand brand);

    //修改品牌
    int brandUpdate(Brand brand);

    //添加品牌
    @Insert("insert into brand values (null,#{brandName},#{brandLeter},#{brandDesc})")
    int brandInsert(Brand brand);

    //删除品牌
    @Delete("delete from brand where brand_id = #{brandId}")
    int brandDelete(Integer brandId);

    //显示品牌表
    @Select("select * from brand")
    List<Brand> brandList();
}
